package com.topwalk.datacollect.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("classpath:header.properties")
public class HeaderConfig {
	
	/** 数据格式
		{
		"params":{
			"dataFormat":"json",
			"dataType":"source_fileexchangelog_log",
			"logTime":"201912120101666",
			"isIncrement":"y",
			"collectCode":"001"
			},
		"businessData":{"version":1,"platID":"P11111101","linkID":"88888888","deviceID":"12345678","bizID":"88888888","sip":"192.168.1.3","dip":"10.10.10.10","protocol":"TCP","direct":"1","fileName":"ZP.PNG","fileType":"PNG","fileSize":1234,"fileHash":"6c06dd566c7c9a54de847efcca970bf4","result":"1","transTime":"2018-09-31T00:00:01","outOfLine":"0","desc":"1","treadtment":"111111111","dataType":"source_fileexchangelog_log","ZJLID":"333","SJLYXTFLDM":"456","CJD":"678","XXRKSJ":666,"SJMGJB":"9999"}
		}
	*/
	public static String INC;

	/** 数据格式
		{
		"params":{
			"dataFormat":"json",
			"dataType":"bsa_t_reg_platinf_list",
			"logTime":"20191212010150",
			"isIncrement":"n",
			"collectCode":"001",
			"batchNum":"111",
			"totalCount":"4"
			},
		"businessData":{"version":1,"platID":"P11111101","linkID":"66666","bizID":88888888,"proID":99999999,"proName":"WEB服务","proCode":"TCP/IP","srcIP":"192.168.1.1-192.168.8.8","destIP":"1.1.1.1-1.1.1.2","srcPort":"1-65535","destPort":"80","collectTime":"2018-09-31T12:23:21","dataType":"bsa_t_reg_bizproinf_list","ZJLID":"1","SJLYXTFLDM":"2","CJD":"3","XXRKSJ":"4","SJMGJB":"5"}
		}
	*/
	public static String SYNC;

	@Value("${inc}")
	public void setInc(String inc) {
		HeaderConfig.INC = inc;
	}

	@Value("${sync}")
	public void setSync(String sync) {
		HeaderConfig.SYNC = sync;
	}
	
	

}
